#include <stdio.h>

//实现123456789 * 987654321
int main()
{

    int a[9] = {1,2,3,4,5,6,7,8,9};
    int b[9] = {9,8,7,6,5,4,3,2,1};
    int c[100] = {0};

    for(int i = 0; i < 9; i++)
    {
        for(int j = 0; j < 9; j++)
        {
          c[i+j] += a[8-i] * b[8-j] ;
        }
        for(int j = 0; j < 99; j++)
        {
            if(c[j] >= 10)
            {
                c[j+1] = c[j+1]+(c[j]/10);
                c[j]   = c[j] %10;
            }
        }
    }
    //从第一个不为0的数开始打印
    int flag = 0;
    for(int i = 99; i >= 0; i--)
    {
        if(c[i] != 0)
            flag = 1;
        if(flag == 1)
            printf("%d",c[i]);
    }
    printf("\n");
}